package com.byit.mapper;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.plugins.Page;
import com.byit.domain.AppAddress;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.byit.domain.AppApplication;

import java.util.List;
import java.util.Map;

/**
 * <p>
  * 常用地址表 Mapper 接口
 * </p>
 *
 * @author puyunfeng
 * @since 2019-01-17
 */
public interface AppAddressMapper extends BaseMapper<AppAddress> {

    List<JSONObject> selectByUserId(Long userId);

    JSONObject selectArea(String areaId);

    void updateNoDefault(Long userId);

    void deleteByIdAndUserId(Long addressId, Long userId);

    List<JSONObject> selectProvince();

    List<JSONObject> selectCity(Long provinceId);

    List<JSONObject> selectRegion(Long cityId);

    List<JSONObject> selectAddressList(Page<AppApplication> pageInfo, Map<String, Object> param);
}